<%--
  Created by IntelliJ IDEA.
  User: dllo
  Date: 18/5/16
  Time: 下午2:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>to</title>
</head>
<body>
<%--
其实jsp就是servlet,那么我们jsp也是可以只处理逻辑而不写任何html代码的,也就是说,我们可以
完全抛弃servlet,全部使用jsp,但是不要这么做
--%>
<%
    request.setCharacterEncoding("utf-8");
    String username = request.getParameter("username");
    String password = request.getParameter("password");
    //查数据库
    //把用户名存到session中
    session.setAttribute("username", username);
%>
<p>用户名是:<%=username%>
</p>
<p>密码是:<%=password%>
</p>
</body>
</html>
